<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双向数据绑定</title>

    <script src="../libs/AngularJS.min.js"></script>

    <script>
        angular.module('myApp', [])
            .controller('myCtrl', ['$scope', function ($scope) {
                $scope.inputName = '这是名字';
                $scope.checkbox = true;
            }]);
    </script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
    <h1>双向数据绑定</h1>
    <div class="input-item"><label for="name"></label><input type="text" id="name" ng-model="inputName"></div>
    <div class="input-item"><label><input type="checkbox" ng-model="checkbox">记住密码</label></div>
    <h3 ng-bind="inputName"></h3>
</body>
</html>
